package cn.xopencode.securityservice.enums.activity;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 活动参与角色类型枚举
 */
public enum ParticipatingRoleEnum implements IntArrayValuable {

    PARTICIPANT(1, "参与人员"),
    VIEWER(2, "观摩人员");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ParticipatingRoleEnum::getType).toArray();

    /**
     *  类型
     */
    private final Integer type;
    /**
     * 描述
     */
    private final String name;

    ParticipatingRoleEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
